<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/4/24
 * Time: 19:33
 * @get all process from system
 */

var_dump(wing_enum_processes());

$obj                   = new COM ( 'winmgmts://localhost/root/CIMV2' );
$processes             = $obj->ExecQuery("Select * from Win32_Process");

foreach($processes as $process){
    echo "process id:".sprintf("%' 6d",$process->ProcessId) ."=>". $process->CommandLine,"\r\n";
}

